<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <th:block th:replace="headfoot/head::head_ztree"></th:block>
</head>

<body>
<div class="container-fluid kj-form-container">
    <form
            id="form" class="form-horizontal validate kj-form-container-content" role="form"
            method="post" action="/student/student/save">
        <input type="hidden" id="id" name="id" th:value="${entity?.id}"/>

        <div class="from-group row has-feedback kj-form-title-button-bar">
            <div class="col-md-7">
                <button type="button" class="btn btn-default btn-sm action-ajax-form kj-btn-save">
                    <i class="iconfont icon-baocun"></i>&ensp;保存
                </button>
                <button type="button" class="btn btn-default btn-sm action-close-tab kj-btn-cancel">
                    <i class="iconfont icon-guanbi"></i>&ensp;取消
                </button>
            </div>

            <!--<div class="col-md-5">
                <label class="col-md-6 control-label kj-form-title-button-bar-label">负责人： <span
                    th:text="${entity?.createUserId != null ? entity?.createUserId : ''}"></span>
                </label> <label class="control-label kj-form-title-button-bar-label">创建时间：
                    <span th:text="${entity?.createDate != null ? #dates.format(entity?.createDate, 'yyyy-MM-dd HH:mm:ss') : #dates.format(new java.util.Date().getTime(), 'yyyy-MM-dd HH:mm:ss')}"></span>
                </label>
            </div>-->
        </div>

        <div class="card kj-form-container-card">
            <div class="card-header kj-form-container-card-header">
                <h4>
                    <strong>学生信息</strong>
                </h4>
            </div>
            <div class="card-body kj-form-container-card-body">

                <div class="form-group">
                    <label class="col-md-2 control-label kj-form-container-content-label">姓名</label>
                    <div class="col-md-3 validateDiv">
                        <input class="form-control input-sm kj-form-container-content-input"
                               name="name"
                               type="text"
                               data-rule-required="true" data-rule-maxlength="20"
                               autocomplete="off"
                               placeholder="姓名"
                               th:value="${entity?.name}"/>
                    </div>

                    <label class="col-md-2 control-label kj-form-container-content-label">学号</label>
                    <div class="col-md-3 validateDiv">
                        <input class="form-control input-sm kj-form-container-content-input"
                               name="number"
                               type="text"
                               data-rule-required="true"
                               data-rule-rangelength="5,10"
                               data-rule-repeat="/student/student/checkNumber" data-msg-repeat="学号重复"
                               autocomplete="off"
                               placeholder="学号"
                               th:value="${entity?.number}"/>
                    </div>
                </div>


                <div class="form-group">
                    <label class="col-md-2 control-label kj-form-container-content-label">入学年份</label>
                    <div class="col-md-3 validateDiv">
                        <input	class="form-control input-sm kj-form-container-content-input"
                                  name="year"
                                  type="text"
                                  data-rule-required="true"
                                  data-rule-digits="true"
                                  data-rule-maxlength="4"
                                  data-rule-minlength="4"
                                  autocomplete="off"
                                  placeholder="入学年份"
                                  th:value="${entity?.year}" />
                    </div>

                    <label class="col-md-2 control-label kj-form-container-content-label">班级</label>
                    <div class="col-md-3 validateDiv">
                        <select	id="classesId" class="form-control input-sm kj-form-container-content-select "
                                   name="classesId"
                                   th:data-value="${entity?.classesId}"
                                   data-rule-required="true">
                            <option value="">--请选择--</option>
                            <option th:each="cls:${classes}" th:value="${cls.code}">[[${cls.text}]]</option>

                        </select>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-md-2 control-label kj-form-container-content-label">院系</label>
                    <div class="col-md-3 validateDiv">
                        <select	id="faculty" class="form-control input-sm kj-form-container-content-select "
                                  vic:dict="faculty"
                                   data-option="--请选择--"
                                  data-linkage="true"
                                  data-linkage-url="/system/dict/byParentValue?parentTypeCode=major"
                                  data-linkage-target="#major"
                                  th:data-value="${entity?.faculty}">

                        </select>
                    </div>

                    <label class="col-md-2 control-label kj-form-container-content-label">专业</label>
                    <div class="col-md-3 validateDiv">
                        <select	id="major" class="form-control input-sm kj-form-container-content-select "
                                   name="major"
                                   th:data-value="${entity?.major}"
                                   data-rule-required="true">
                            <option value="">--请选择--</option>

                        </select>
                    </div>
                </div>

                <div class="form-group">

                    <label class="col-md-2 control-label kj-form-container-content-label">状态</label>
                    <div class="col-md-3 validateDiv">
                        <select id="enabled"
                                class="form-control input-sm kj-form-container-content-select"
                                name="status"
                                th:data-value="${entity?.status}">
                            <option value="">--请选择--</option>
                            <option value="0">未入学</option>
                            <option value="1">就读中</option>
                            <option value="2">已毕业</option>

                        </select>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>

<th:block th:replace="headfoot/foot::form_ztree_foot"></th:block>


</body>
</html>